fsck: Fix object count output
authorDan Nicholson <nicholson@endlessm.com>
Tue, 17 Mar 2015 19:20:53 +0000 (12:20 -0700)
committerMatthew Barnes <mbarnes@redhat.com>
Wed, 18 Mar 2015 13:31:07 +0000 (09:31 -0400)
The object count comes from g_hash_table_size(), so it's not a 0 based
index. In order to maintain the mod calculations correctly, just print
out index + 1.

https://bugzilla.gnome.org/show_bug.cgi?id=746360

src/ostree/ot-builtin-fsck.c

index 333614cd7465592e40c772d0be6e8a99d6b61475..ae1dcce4a0a2798a95e104937b619b727a2b16ff 100644 (file)
@@ -224,7 +224,7 @@ fsck_reachable_objects_from_commits (OstreeRepo            *repo,
         goto out;
 
       if (mod == 0 || (i % mod == 0))
-        g_print ("%u/%u objects\n", i, count);
+        g_print ("%u/%u objects\n", i + 1, count);
       i++;
     }